
import http from "../index";
import { PORT1 } from "../config/servicePort";
import { User } from "../interface";

export const addMenu = (params:any)=>{
    return http.post<any>(PORT1 + '/menu/add', params);
};
export const getMenuList = (params:User.FindPage) => {
    return http.get<User.FindPage>(PORT1 + `/menu/list`, params);
};

export const deleteMenu= (id:number)=>{
    return http.delete(PORT1 + `/menu/del/${id}`);
};
export const getAllMenus = ()=>{
    return http.get(PORT1 + `/menu/all_list`);
};
export const getByPid = (id:string)=>{
    return http.get(PORT1 + `/menu/byPid/${id}`);
};
export const getIconDict = ()=>{
    return http.get(PORT1 + `menu/icons`);
};